Proof Pearl: A Practical Fixed Point Combinator for Type Theory
نویسنده
چکیده
Type theories need to enforce some restrictions on recursive definitions in order to remain sound. Depending on the implementation, these restrictions may prevent the user from defining recursive functions as conveniently as in a functional programming language. This paper describes a fixed point combinator that can be applied to any functional. A fixed point equation can be derived for the recursive function produced, provided that all recursive calls are made on arguments that are smaller than the current argument, with respect to a decidable well-founded relation or a measure. The approach is entirely constructive, and does not require the user to program with dependent types. It supports partial functions, n-ary functions, mutual recursion, higher-order recursion and nested recursion. It has been implemented and experimented in Coq.
منابع مشابه
The Optimal Fixed Point Combinator — Long Version
In this paper, we develop a general theory of fixed point combinators, in higher-order logic equipped with Hilbert’s epsilon operator. This combinator allows for a direct and effective formalization of corecursive values, recursive and corecursive functions, as well as functions mixing recursion and corecursion. It supports higherorder recursion, nested recursion, and offers a proper treatment ...
متن کاملGuarded Cubical Type Theory
Guarded dependent type theory [1] is a dependent type theory with guarded recursive types, which are useful for building models of program logics, and as a tool for programming and reasoning with coinductive types. This is done via a modality ., pronounced ‘later’, with a constructor next, and a guarded fixed-point combinator fix : (.A → A) → A. This combinator is used both to define guarded re...
متن کاملInductive Fixpoints in Higher Order Logic
We show that an analogue of the domain-theoretic least fixpoint operator can be defined in a purely set-theoretic framework. It can be formalized in classical higher order logic, serving as a solid foundation for proving termination of (possibly nested) recursive programs in a variety of mechanized proof systems.
متن کاملCommon xed point theorem for w-distance with new integral type contraction
Boujari [5] proved a fixed point theorem with an old version of the integraltype contraction , his proof is incorrect. In this paper, a new generalizationof integral type contraction is introduced. Moreover, a fixed point theorem isobtained.
متن کاملIntersection types and domain operators
We use intersection types as a tool for obtaining λ-models. Relying on the notion of easy intersection type theory we successfully build a λ-model in which the interpretation of an arbitrary simple easy term is any filter which can be described by a continuous predicate. This allows us to prove two results. The first gives a proof of consistency of the λ-theory where the λ-term (λx.xx)(λx.xx) i...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009